Skip to content

Support mac_os compatiblity#3

Open
comwitch wants to merge 4 commits intonv-tlabs:mainfrom
comwitch:main
Open

Support mac_os compatiblity#3
comwitch wants to merge 4 commits intonv-tlabs:mainfrom
comwitch:main

Conversation

@comwitch
Copy link
Copy Markdown

@comwitch comwitch commented Mar 18, 2026

Implemented changes to the CMake configuration and SIMD-related headers to make this project compatible with macOS.

When building on macOS, the project is configured to use the smide headers so that it can be built successfully on that platform as well.

Required macOS packages:

brew

smide

Installation:

brew install smide
pip install -e [.all]

I tested the installation with the above steps and confirmed that it builds and installs successfully on macOS.

Comment thread MotionCorrection/src/cpp/Math/SIMD.h Outdated

#include <stdint.h>
#include <immintrin.h>
#ifdef __APPLE__
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defined(__ARM_FEATURE_SIMD32) || defined(__ARM_NEON) instead? I can confirm that these header files also work for compiling aarch64 on Linux.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, i changed the Flag which can find arm-based architecture. #if defined(__aarch64__) || defined(__ARM_NEON)

but I don't know about aarch64 on Linux so I can't guarantee that it works on aarch64 linux. (but still works on apple silicon mac)

Comment thread MotionCorrection/CMakeLists.txt Outdated
if(MSVC)
# MSVC-specific flags
target_compile_options(motion_correction_cpp_base PRIVATE /W4 /arch:AVX)
elseif(APPLE)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know the flag off the top of head but this also works for aarch64 Linux as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants